概述
SViewService API 为用户介绍了云服务接口的调用方法和详细说明,帮助第三方调用云服务接口。
约定
- 接口名采用骆驼命名法。
- 接口参数及接口返回Json串的键名使用小写字母加下划线格式如:"modify_time"。
-
version=版本号mroot=https://service.sv3d.cn/version
返回值
模块 | 返回码 | 描述 |
---|---|---|
全局参数 | 0 | 接口调用成功 |
1 | 参数不得为空(参数为空或者参数名传错) | |
2 | 参数值传值错误 | |
3 | 文件不存在 | |
性能改进 | 1001 | 文件解压失败 |
1002 | 数据库保存失败 | |
1003 | 压缩异常 | |
1004 | 压缩文件不合法,可能被损坏 | |
1005 | 生成文件错误 | |
1006 | IO异常 | |
1007 | 无权限删除他人视图 | |
1008 | 无权限修改他人视图 | |
1009 | 文件重命名失败 | |
授权服务模块 | 2003 | 您的试用申请已达上限 |
2004 | 无可用点数 | |
2006 | 许可信息不存在 | |
2007 | 产品名称不匹配 | |
2008 | 主版本号不匹配 | |
2009 | 令牌已过期 | |
2010 | 授权还没开始 | |
2011 | 授权已到期 | |
2012 | 无权限 | |
2013 | 认证模式不匹配 | |
2014 | MAC地址不匹配 | |
2015 | 许可文件重复上传 | |
2016 | 文件上传失败 | |
2017 | 许可不存在 | |
2018 | 许可已禁止使用 | |
2019 | 您已被禁止访问 | |
2020 | 许可认证失败 | |
2021 | 许可签名不匹配 | |
2022 | 令牌与客户端不匹配 | |
2023 | 令牌与认证产品不匹配 | |
2024 | 许可申请信息不存在 | |
2025 | 邮件发送失败 | |
2026 | 产品版本号格式错误 | |
2027 | 该产品已存在 | |
2028 | 该产品及版本已存在 | |
用户服务模块 | 3001 | 用户名或密码错误 |
3002 | 缺少登录凭证 | |
3003 | 用户未登录 | |
3004 | 用户不存在 | |
3005 | 用户名已注册 | |
3006 | 原密码错误 | |
3007 | 用户名只能修改一次 | |
3008 | 游客账号不允许修改 | |
文档服务模块 | 4001 | 文件/夹不存在 |
4002 | 上传文件大小超过最大允许大小 | |
4003 | 空间不足 | |
4004 | 引用文件不存在 | |
4005 | 请选择需要移动的文件/夹 | |
4006 | 不能将文件夹移动到自身目录下 | |
4007 | 不能移动到同一个文件夹下,请选择其他文件夹 | |
4008 | 不能将文件夹移动到子目录下 | |
4009 | 文件/夹名重复,重命名失败 | |
4010 | 不能将文件/夹移动到他人目录下 | |
4011 | 不能移动别人文件/夹 | |
4012 | 不能重命名别人文件/夹 | |
4013 | 请选择需要删除的文件/夹 | |
4014 | 不能解压别人文件/夹 | |
4015 | 解压失败,仅支持.zip,.rar格式 | |
4016 | 解压失败 | |
4017 | 文件夹名重复,创建失败 | |
7001 | 图片或模型不得为空 | |
产品服务模块 | 5001 | 请选择图片 |
5002 | 产品已存在 | |
5003 | 产品版本号格式不正确 | |
5004 | 没有找到对应产品 | |
会议服务模块 | 6001 | 会议已存在 |
6002 | 会议不存在 | |
6003 | 会议已经结束 | |
6004 | 引用文件不存在 | |
6005 | 文件上传失败 | |
转换服务模块 | 8003 | 不支持的转换 |
8004 | 模型正在转换中 | |
8005 | 源文件已删除 | |
8006 | 任务已删除 | |
8007 | 等待中和转换中的任务不能重新转换 | |
8008 | 只允许置顶等待中的任务 | |
8009 | 日志文件不存在 | |
8010 | 无相同输出格式 | |
8011 | 只有等待中或转换中的任务才可后台转换 | |
转换状态 | 1 | 转换中 |
2 | 等待中 | |
3 | 停止 | |
4 | 失败(失败时同时会返回失败原因码,具体见下方) | |
5 | 成功 | |
转换失败原因 | 4003 | 空间不足 |
8001 | 转换异常 | |
8002 | 转换超时 | |
-1 | 内存不足 | |
-2 | 打开文件失败 | |
-4 -26 | 许可验证错误,无转换许可 | |
-5 | 输入文件不存在 | |
-6 | 输出路径不存在 | |
-13 | 转换参数错误 | |
-22 | 读取输入文件失败 | |
-23 | 生成文件失败 | |
-27 | 该类型格式版本不支持 | |
-28 | 文件不存在 | |
-30 | 未知的文件类型 | |
-31 | 文件已损坏 | |
-32 | 空文件 | |
-1000 | 不支持的转换类型 | |
-1001 | 未知错误 |
接口列表
系统服务
获取接口版本号
接口链接
service.sv3d.cn/sviewservice/system/interversion
说明
获取接口版本号
参数:(GET、POST)
无
返回值(JSON):
成功:
{ "return":"0", "version":"xx.xx.xx" }
备注
无
产品服务
获取产品最新版本
接口链接
mroot/product/get
接口版本
7.1
说明
获取产品最新版本
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
product | 是 | String | 产品名: "SVLPlayer for iOS", "SVLPlayer for Android", "SView for Windows-32Bit", "SView for Windows-64Bit", "SView for Designer-32Bit", "SView for Designer-64Bit", "SView Converter-32Bit", "SView Converter-64Bit", "SView for HTML5" |
type | 是 | String | 版本类型:"0"开发版、"1"正式版 |
返回值(JSON):
成功:
{ "return":"0", "description":"1、修复漫游复位缺陷...", "productid": "280d00ba-27e4-4bf8-8a6d-532a0dca33bc", "size": "15146647", "version": "7.1",//获取的调用接口接口版本号 "productversion": "6.2.1.1"//产品版本号 }失败:
{ "return":"1",//1或5004 "msg":"参数不得为空!" }
备注
无
下载产品
接口链接
mroot/product/download
接口版本
7.1
说明
下载产品
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
productid | 是 | String | 产品id |
返回值(stream):
成功:
{ 输出文件流 }失败:
{ "return":"1",//1或3 "msg":"参数不得为空!" }
备注
无
用户服务
用户登录
接口链接
mroot/user/login
接口版本
7.1
说明
客户端使用用户名跟密码登录
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
name | 是 | String | 用户名 |
password | 是 | String | 密码 |
deviceid | 是 | String | 设备硬件号 |
devicetype | 是 | String | 设备类型("Windows","Web","H5",移动端传设备型号) |
customtype | 是 | String | 客户端类型1、安卓 2、iOS 3、windows 4、H5 5、Web |
loginip | 是 | String | 登录设备ip |
返回值(JSON):
成功:
{ "return":"0", "onlineid":"8d2c7c6c-e7aa-49ba-83e2-ce609dd7888b",//登录凭证 "user": { "createtime": "2019-07-26", "id": "ec8d67c9-4682-40bb-a92d-658417982c23", "ischangename": 0,//是否修改过用户名0未修改1修改 "level": "1",//用户类型:0管理员,1普通 "name": "abcdefg", "nickname": "abcdefg", "photo": "http://.../nophoto.jpg", "type": "0",//账户类型0普通账户1企业账户 "usedspacesize": 494403864, "userspacesize": 524288000 } }失败:
{ "return":"1",//1、3001 "msg":"参数不得为空!" }
备注
无
查询用户信息
接口链接
mroot/user/info
接口版本
7.1
说明
查询客户信息
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
返回值(JSON):
成功:
{ "return":"0", "user": { "createtime": "2019-07-26", "customid": "", "id": "ec8d67c9-4682-40bb-a92d-658417982c23", "ischangename": 0,//是否修改过用户名0未修改1修改 "level": "1",//用户类型:0管理员,1普通 "name": "abcdefg", "nickname": "abcdefg", "photo": "http://.../nophoto.jpg", "type": "0",//账户类型0普通账户1企业账户 "userspacesize": 524288000 } }失败:
{ "return":"1",//1、3002、3003、3004 "msg":"参数不得为空!" }
备注
无
退出登录
接口链接
mroot/user/logout
接口版本
7.1
说明
退出登录
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
返回值(JSON):
成功:
{ "return":"0", }失败:
{ "return":"1",//3002、3003 "msg":"参数不得为空!" }
备注
无
修改用户信息
接口链接
mroot/user/update
接口版本
7.1
说明
修改用户信息
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
name | 是 | String | 修改后的用户名,未修改则传原用户名 |
nickname | 是 | String | 修改后的昵称,未修改则传原昵称 |
返回值(JSON):
成功:
{ "return":"0", }失败:
{ "return":"1",//1、3002、3003、3004、3008、3005、3007 "msg":"参数不得为空!" }
备注
无
修改用户头像
接口链接
mroot/user/updatephoto
接口版本
7.1
说明
修改用户头像,onlineid需要用get方式传参
参数:(GET)
multipart/form-data
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证,get方式传参 |
image | 是 | 文件流 | 用户头像 |
返回值(JSON):
成功:
{ "return":"0", }失败:
{ "return":"1",//1、3002、3003 "msg":"参数不得为空!" }
备注
无
修改密码
接口链接
mroot/user/changepass
接口版本
7.1
说明
修改密码
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
password | 是 | String | 原密码 |
newpassword | 是 | String | 新密码 |
返回值(JSON):
成功:
{ "return":"0", }失败:
{ "return":"1",//1、3002、3003、3004、3008、3006 "msg":"参数不得为空!" }
备注
无
文档服务
注:文档服务是用来管理系统文件的服务,其中包括管理用户的个人文件/夹,每个用户默认有500M的个人空间。
个人空间中,文件夹id="0"表示根目录
引用
接口链接
mroot/file/reference
接口版本
7.1
说明
客户端往个人空间提交文件时,首先发送此请求,如果服务器返回文件不存在,再发送真实上传模型的请求。
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
filename | 是 | String | 上传的文件名 |
pfolderid | 是 | String | 所在文件夹id,0表示根目录 |
md5 | 是 | String | 文件MD5 |
filesize | 是 | String | 文件大小,字节 |
返回值(JSON):
成功:
{ "return":"0", "userfileid":"8d2c7c6c-e7aa-49ba-83e2-ce609dd7888b",//云盘中用户文件id "fileid":"280d00ba-27e4-4bf8-8a6d-532a0dca33bc"//用户文件对应的源文件id }失败:
{ "return":"1",//1、3002、3003、4001、4002、4003、4004 "msg":"参数不得为空!" }
备注
无
上传
接口链接
mroot/file/upload
接口版本
7.1
说明
onlineid需要用get方式传参。
参数:(GET)
multipart/form-data
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证,get方式传参 |
modelfile | 是 | 文件流 | 上传的文件 |
pfolderid | 是 | String | 所在文件夹id,0表示根目录 |
返回值(JSON):
成功:
{ "return":"0", "userfileid":"8d2c7c6c-e7aa-49ba-83e2-ce609dd7888b",//云盘中用户文件id "fileid":"280d00ba-27e4-4bf8-8a6d-532a0dca33bc"//用户文件对应的源文件id }失败:
{ "return":"1",//1、3002、3003、4001、4003 "msg":"参数不得为空!" }
备注
无
获取用户文件列表
接口链接
mroot/file/userfilelist
接口版本
7.1
说明
获取某一级文件夹下的文件列表
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
folderid | 否 | String | 所在文件夹id,为空时默认根目录 |
searchcontent | 否 | String | 搜索内容(文件/文件夹名) |
orderby | 否 | String | 根据什么排序1、文件名2、大小3、修改日期,默认为“3” |
ordertype | 否 | String | 排序方式1、升序2降序,默认降序 |
返回值(JSON):
成功:
{ "return":"0", "files": [ { "id": "303606d9-b1e7-48c7-b1e1-5f7e122cb36a", "modifytime": "2019-07-26 11:18:14",//修改时间 "name": "bbb",//文件夹名 "type": "1"//类型0文件1文件夹 }, { "fileid": "cac6c1be-126a-41ff-87cc-301b3090e64c", "filesize": 40780, "filetype": "svlx", "id": "e5052105-d504-4302-8b60-20af7bb1080a", "isallowedconvert": "0",//是否允许添加到格式转换0不允许1允许 "md5": "414398f6941d5252df4146f560b2fd24", "modifytime": "2019-07-26 11:18:14", "name": "3d_pmi.svlx", "type": "0"//类型0文件1文件夹 "input": "SVL2.0"//文件类型 },{...} ], "paths": [ //当前所处文件夹路径,此路径为aaa/ccc/... { "folderid": "feb8880f-43bc-41f6-84c5-9463edeedd84", "name": "aaa" }, { "folderid": "f4998027-17ee-402e-b1a4-4cd9f30df770", "name": "ccc" }, {...} ], "pfolderid": "feb8880f-43bc-41f6-84c5-9463edeedd84"//父文件夹id,0表示根目录 }失败:
{ "return":"1",//1、3002、3003 "msg":"参数不得为空!" }
备注
无
获取样例模型列表
接口链接
mroot/file/samplelist
接口版本
7.1
说明
获取样例库
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
pagenum | 否 | int | 页码,默认1 |
pageRecorders | 否 | int | 每页显示个数,默认12 |
searchcontent | 否 | String | 模型标题 |
返回值(JSON):
成功:
{ "return":"0", "list": [ { "createtime": "2019-07-24 08:26:21", "description": "3d_pmi", "filename": "3d_pmi.svlx", "filesize": 40780, "id": "5650dd73-aa52-49b3-8d44-87af4a4bd325",//样例模型id "image": "http://.../3d_pmi.png", "md5": "414398f6941d5252df4146f560b2fd24", "fileid": "cac6c1be-126a-41ff-87cc-301b3090e64c", "name": "3d_pmi" }, {...} ] }
备注
无
移动文件/夹
接口链接
mroot/file/move
接口版本
7.1
说明
移动文件/夹
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
ids | 是 | String | 文件/夹id字符串,多个中间用逗号隔开 |
targetfolderid | 是 | String | 目标文件夹id,0表示根目录 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",//1、3002、3003、4001、4005、4010、4011、4007、4006、4008 "msg":"参数不得为空!" }
备注
无
重命名文件/夹
接口链接
mroot/file/rename
接口版本
7.1
说明
重命名文件/夹
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
userfileid | 是 | String | 文件/夹id |
newname | 是 | String | 新名字 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",//1、3002、3003、4001、4012、4009 "msg":"参数不得为空!" }
备注
无
删除文件/夹
接口链接
mroot/file/remove
接口版本
7.1
说明
删除文件/夹
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
ids | 是 | String | 文件/夹id字符串,多个中间用逗号隔开 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",//1、3002、3003、4013 "msg":"参数不得为空!" }
备注
无
解压文件
接口链接
mroot/file/unzip
接口版本
7.1
说明
解压文件,只支持.zip跟.rar格式的压缩包,且压缩包无密码
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
userfileid | 是 | String | 需要解压的用户文件id |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",//1、3002、3003、4001、4014、4015、4003、4016 "msg":"参数不得为空!" }
备注
无
创建文件夹
接口链接
mroot/file/create
接口版本
7.1
说明
创建文件夹
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
pfolderid | 是 | String | 父文件夹id,0表示根目录 |
name | 是 | String | 文件夹名 |
返回值(JSON):
成功:
{ "return":"0", "folderid":"8d2c7c6c-e7aa-49ba-83e2-ce609dd7888b"//新创建的文件夹id }失败:
{ "return":"1",//1、3002、3003、4017 "msg":"参数不得为空!" }
备注
无
获取目录
接口链接
mroot/file/catalogue
接口版本
7.1
说明
移动文件/夹时,获取目录结构
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
pfolderid | 是 | String | 父文件夹id,0表示根目录 |
folders | 是 | String | 选中的文件/夹id字符串,多个中间用逗号隔开 |
返回值(JSON):
成功:
{ "return":"0", "folders": [ { "createtime": "2019-07-26 14:09:31", "filename": "ddd", "id": "b9fa77c5-91fb-4c74-b138-af19972a00f3", "isdelete": 0, //0未删除1删除 "modifytime": "2019-07-26 14:09:31", "pfileid": "0", //参数废弃 "pfolderid": "0", "type": "1", //类型0文件1文件夹 "userid": "bc07fd22-e4d3-4555-8c35-b75c36e391a2" }, { "createtime": "2019-07-26 11:11:50", "filename": "aaa", "id": "feb8880f-43bc-41f6-84c5-9463edeedd84", "isdelete": 0, "modifytime": "2019-07-26 11:11:50", "pfileid": "0", "pfolderid": "0", "type": "1", "userid": "bc07fd22-e4d3-4555-8c35-b75c36e391a2" },{....} ] }失败:
{ "return":"1",// 1、3002、3003 "msg":"参数不得为空!" }
备注
无
下载个人文件
接口链接
mroot/file/downloaduserfile
接口版本
7.1
说明
支持多文件以压缩包形式下载
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
ids | 是 | String | 文件/夹id字符串,多个中间用逗号隔开 |
返回值(stream):
成功:
{ 输出文件流 }失败:
{ "return":"1",// 1或3 "msg":"参数不得为空!" }
备注
无
下载样例模型
接口链接
mroot/file/downloadsample
接口版本
7.1
说明
下载样例模型
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
modelid | 是 | String | 样例模型id |
返回值(stream):
成功:
{ 输出文件流 }失败:
{ "return":"1",// 1或3 "msg":"参数不得为空!" }
备注
无
下载源文件
接口链接
mroot/file/downloadsource
接口版本
7.1
说明
下载源文件,扫码下载时需要调用此接口下载文件
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
fileid | 是 | String | 源文件id |
返回值(stream):
成功:
{ 输出文件流 }失败:
{ "return":"1",// 1或3 "msg":"参数不得为空!" }
备注
无
预览样例库模型
接口链接
mroot/file/viewsample
接口版本
7.1
说明
预览样例库模型
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
id | 是 | String | 样例模型id |
返回值:
成功:
{ 返回预览三维页面 }失败:
{ 返回错误文字"参数不得为空"、"模型不存在" }
备注
无
预览个人空间中的模型
接口链接
mroot/file/viewuserfile
接口版本
7.1
说明
预览云盘的用户模型
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
id | 是 | String | 云盘的用户模型id |
返回值:
成功:
{ 返回预览三维页面 }失败:
{ 返回错误文字"参数不得为空"、"模型不存在" }
备注
无
获取模型PMI数据
接口链接
service.sv3d.cn/sviewservice/file/getTextMeshAll
接口版本
7.1
说明
获取模型PMI数据
参数:(输入流)
例:
[ {"pmiID":1,"comTextID":0,"ctextID":0,"text":"⌀"}, {"pmiID":1,"comTextID":0,"ctextID":1,"text":"20"} ]
返回值:
成功:
[ {"vertexs":"数组","indexes":"数组","text":"0","pmiID":1,"comTextID":"0","CTextID":1}, {"vertexs":"数组","indexes":"数组","text":"0","pmiID":1,"comTextID":"0","CTextID":1} ]
备注
无
转换服务
注:将云盘中允许转换的文件添加到转换队列进行转换,支持转换任务的停止、置顶等操作。
1:转换中 2:等待中 3:已停止 4:失败 5:转换成功
获取输入类型
接口链接
mroot/convert/config/inputs
接口版本
7.1
说明
根据用户文件类型获取输入类型,如果inputs为空则获取所有输入类型,否则取所有输 入类型的交集
参数:(POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
inputs | 否 | String | 需要转换的用户文件类型字符串,多个类型用逗号隔开(例:"STEP,SVL1.0,UG NX 3D") |
返回值(JSON):
成功:
{ "return":"0", "inputs": [ //多个文件时结果自动取交集 { "input": "3DXML", "inputformat": "3DXML (*.3dxml)" }, { "input": "3MF", "inputformat": "3MF (*.3mf)" }, { "input": "ACIS", "inputformat": "ACIS(*.sat)" }, { "input": "Catia V4", "inputformat": "Catia V4(*.model)" }, { "input": "Catia V5 3D", "inputformat": "Catia V5 3D (*.CATPart;*.CATProduct)" }, { "input": "CGR", "inputformat": "CGR(*.cgr)" }, { "input": "IGES", "inputformat": "IGES(*.igs)" } ] }失败:
{ "return":"1",//1、3002、3003、3、8005、8003、8010 "msg":"参数不得为空!" }
备注
无
获取输出类型
接口链接
mroot/convert/config/outputs
接口版本
7.1
说明
根据用户文件类型获取可以转换出的类型,inputs为空时默认获取所有输出类型
参数:(POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
inputs | 否 | String | 需要转换的用户文件类型字符串,多个类型用逗号隔开(例:"STEP,SVL1.0,UG NX 3D") |
返回值(JSON):
成功:
{ "return":"0", "outputs": [ //多个文件时结果自动取交集 { "output": "3DXML", "outputformat": "3DXML (*.3dxml)" }, { "output": "3MF", "outputformat": "3MF (*.3mf)" }, { "output": "ACIS", "outputformat": "ACIS(*.sat)" }, { "output": "Catia V4", "outputformat": "Catia V4(*.model)" }, { "output": "Catia V5 3D", "outputformat": "Catia V5 3D (*.CATPart;*.CATProduct)" }, { "output": "CGR", "outputformat": "CGR(*.cgr)" }, { "output": "IGES", "outputformat": "IGES(*.igs)" } ] }失败:
{ "return":"1",//1、3002、3003、8003、8010 "msg":"参数不得为空!" }
备注
无
获取默认输入类型
接口链接
mroot/convert/config/defaultInput
接口版本
7.1
说明
用户默认输入类型为空时,自动获取系统默认输入类型
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
返回值(JSON):
成功:
{ "return":"0", "input": "UG NX 3D" }失败:
{ "return":"1",//1、3002、3003 "msg":"参数不得为空!" }
备注
无
获取默认输出类型
接口链接
mroot/convert/config/defaultOutput
接口版本
7.1
说明
用户默认输出类型为空时,自动获取系统默认输出类型
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
返回值(JSON):
成功:
{ "return":"0", "output": "SVL2.0" }失败:
{ "return":"1",//1、3002、3003 "msg":"参数不得为空!" }
备注
无
获取转换配置文件内容
接口链接
mroot/convert/config/get
接口版本
7.1
说明
获取顺序 根据configid获取--》获取用户默认配置--》获取系统默认配置
参数:(POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
configid | 否 | String | 配置id |
input | 否 | String | 输入类型(例:UG NX 3D) |
output | 否 | String | 输出类型(例:SVL2.0) |
注:configid跟输入输出类型不能同时为空
返回值(JSON):
成功:
cadexchanger配置文件返回值如下: { "return": "0", "input": "STEP", "output": "CGR", "configname": "cadexchanger",//配置文件名字,可根据此区别是哪种配置文件 "config": { "asm_visibility": false,//装配显隐 "body_to_nurbs": false,//将所有的集合转换成nurbs "catiaV52DConfig": { "filter_detail_sheets": true//是否过滤细节表到CATDrawing文件 }, "catiaV5Config": { "write_hybrid_bodies": false,//保存混合body "write_ref_plane_as_hidden": true,//隐藏参考平面 "write_release": 14//输出版本R14 R15 R16 R17 R18 R19 }, "choose_axis": 0, //Should we apply an axis placement ? //[-1] -> Use Default, [0] -> Use None, [1] -> Open box "choose_in_assembly_tree": 0, //[-1] -> Use Default, [0] -> Use None, //[1] -> Open box "choose_in_catalog": -1, //Should we convert all part configuration ? //[-1] -> Convert Default, [0] -> Convert All, //[1] -> Open box "choose_layer_filter": 0, //Should we apply a layer filter ? //[-1] -> Use Default, //[0] -> Use None, [1] -> Open box "choose_referenceset_filter": 0, //Should we apply a referenceset ? //[0] -> Use None, [1] -> Open box "colladaConfig": { "explode_entities": false, "keep_dtk_tree": true, "no_instance_node": true, "reverse_transparency": false, "use_vertex_color": false, "version": 141 }, "construct_solids": true, "courbe_lim_3d": 0, //Which trimming curves should we setup ? //1 : Only 2D curves //2 : Boths 2D+3D //3 : Only 3D curves "draw": false, "explose_group": true, //Should we write a group for faces //in same solid if KEEP_ASSEMBLY = 0 ? //[1] -> no, [0] -> yes "fdt": true, //是否忽略PMI信息,true代表忽略 "fdt_visibility": false,//PMI显隐 "features": true, "filaire": true,//是否移除边界线 "geom_link": true, //Should we ignore geometrical links for highlightning? //[1] -> Yes, [0] -> No "igesConfig": { "bound_preference": 2, //Which boundary curves should we read ? //2 : Priority to UV boundary curves //3 : Priority to 3D boundary curves "name_as_406": false//将实体名称设置为406 }, "jtConfig": { "jt_pmi_as_semantic": false,//PMI描述数据 "write_export_type": 0, //Export type 输出类型 //[0] -> Monolithic (default), //[1] -> Shattered, [2] -> PerPart "write_release": 80, //Version output 输出版本 //[80] -> version 8.0 (default), [95] -> version 9.5 "write_strategy": 1, //Assembly strategy //[0] -> Write components only (default), [1] -> Write //components and filled nodes "write_xtbrep": false //Should we write ParasolidBRep //in the JT file ?//输出精确数据 //[1] -> Yes , [0] -> No (default) }, "keep_assembly": true,//保留装配信息 "merge_bodies": false,//合并body "mesh": true, "meta_parameters": true,//是否忽略模型属性 "model_display": false,//是否忽略自定义视图 "nb_decimale": 10.0, "par_solide": false,/每个body输出一个文件 "parasolidConfig": { "use_part_name": false,//把零件名称设置到body上 "write_body_attributes": true//填充body属性 }, "pdfConfig": { "geo_format": 0, //Should we write tesselated data or brep data ?//几何格式 //[0] -> Mesh (Default), [1] -> BRep, [2] -> Mesh + BRep //BRep is only available when writing PRC "monochrome_display": false,//Should we export as monochrome display ? "rasterize_texts": true,//文本折线化 "truetype_font": ""C:\Windows\Fonts\unifont_0.ttf"", "write_prc": true//内嵌prc }, "per_catalog": false,//每个catalog输出一个文件 "referentiel": true, //坐标系 "remove_nodes": false, "render_infos": true, "solidworksConfig": { "multy_body": true//读取所有body }, "stepConfig": { "read_component_name": 1, "read_fdt": 0, //step reader PMI //integer Drives Reading of FDT //(0=no 1=graphic only 2=graphic + semantic) "validation_property": 0, //step reader 验证属性 //integer Drives Computing/Checking of //Validation Propeties (Read & Write) //[0] -> no //[1] -> computes simple validation properties //[2] -> computes geometric validation properties //(except clouds of points) //[3] -> computes also clouds of points "write_fdt": 1, //step write PMI //integer Drives Writing of FDT //(0=no 1=semantic + graphic 2=semantic only 3=graphic only) "write_fdt_polyline": 0, //step write PMI折线化 //integer Selects mode for graphic output //(0=default 1=minimal graphic //2=polyline 3=2D tesselation 4=3D tesselation) "write_itemname": 2, //step write item名称 //integer Writes Names of Items (topological items) //[0] -> no (empty name) //[1] -> name from CAD if defined, else empty //[2] -> "n?iii" : ID from CAD //[3] -> "no iii" : ID from CAD "write_ln_unit": 0, "write_property": 0, //step write 属性 //integer Writes Attributes and Properties //[0] -> no //[1] -> Product Data //[2] -> also general attributes(metadata) //except "File Property" //[3] -> all general attributes, also "File Property" "write_version": 0 //step write 输出版本 //integer Writes Step Version //(0=AP214 or AP203E2 with FDT //1=AP203 2=AP214 3=AP203E2 4=AP242) }, "tessellationConfig": { "angular_dis": false,//是否忽略角度公差 "angular_tol": 10.0,//角度公差值 "compute_boundaries_from_mesh": true, "compute_normales_from_surface": true, "linear_dis": false,//是否忽略折线公差 "linear_tol": 0.1,//折线公差值 "maxsize": "100000000000000010000000000000000000000000000000000.0000000", "minsize": 0.0, "ratio": 10000.0, "use_tessel": false,//是否忽略优先使用模型中的轻量化数据 "write_ascii": false }, "tol_continuite": 0.01, "visibility": false,//零件显隐 "write_log_file": true,//日志 "write_lst_file": false } } cadconverter配置文件返回值如下: { "return": "0", "input": "STEP", "output": "SVL2.0", "configname": "cadconverter",//配置文件名字,可根据此区别是哪种配置文件 "config": { "angle_tolerance": 30.0,//角度公差 "boundaryline": true,//边界线 "cable": true,//线缆 "cablesheath": false,//线鞘 "compress": 1,//压缩模式0、不压缩1、快速压缩2、高质量压缩 "custom_lod": false,//是否使用自定义LOD设置 "customview": true,//自定义视图 "debuginfo": false,//输出PMI调试信息(开发人员使用) "forcetess": true,//使用SView的分元 "hiddenobject": false,//隐藏对象 "layer": false,//图层 "line_tolerance": 5.0,//折线公差 "log": 1,//输出日志0、不输出1、普通用户2、高级用户3、开发人员 "merge": 0, "mesh_merge": 0,Mesh合并0、不合并1、合并 "model_compare": false,//模型比较(适合Pro/E二次开发使用) "model_property": false, "only_current": false,//只转换当前 "outputmode": 0,//输出方式0、单一文件1、分散文件 "pmi": true,// PMI "preview": false,//缩略图 "snapshot": true,//输出快照文件 "spaceline": false,//空间线 "spacespot": false//空间点 } } rvmconverter配置文件返回值如下: { "return": "0", "input": "RVM", "output": "SVL2.0", "configname": "rvmconverter",//配置文件名字,可根据此区别是哪种配置文件 "config": { "angulartolerance": 30.0,//角度公差 "lineartolerance": 5.0,//折线公差 } }失败:
{ "return":"1",//1、3002、3003、3 "msg":"参数不得为空!" }
备注
无
创建/修改转换配置
接口链接
mroot/convert/config/saveOrUpdate
接口版本
7.1
说明
创建转换配置或者修改转换配置
参数:(POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
configid | 否 | String | 配置id,为空时执行创建操作 |
input | 是 | String | 输入类型(例:UG NX 3D) |
output | 是 | String | 输出类型(例:SVL2.0) |
转换配置相关参数:
1.cadexchanger配置参数 "cadexchanger.filaire":"true",//边界线 "cadexchanger.visibility":"false",//零件 "cadexchanger.asm_visibility":"false",//装配 "cadexchanger.fdt_visibility":"false",//PMI "cadexchanger.model_display":"false",//自定义视图 "cadexchanger.meta_parameters":"true",//模型属性 "cadexchanger.use_tessel":"false",//优先使用模型中轻量化数据 "cadexchanger.fdt":"true",//PMI "cadexchanger.par_solide":"false",//每个Body输出一个文件 "cadexchanger.per_catalog":"false",//每个Catalog输出一个文件 "cadexchanger.write_log_file":"true",//日志 "cadexchanger.linear_tol":"0.1",//折线公差 "cadexchanger.angular_tol":"10",//角度公差 "cadexchanger.body_to_nurbs":"false",//将所有的几何转换成Nurbs "cadexchanger.keep_assembly":"true",//保留装配信息 "cadexchanger.merge_bodies":"false",//合并Body "cadexchanger.name_as_406":"false",//将实体名称设置为406 "cadexchanger.write_body_attributes":"true",//填充Body属性 "cadexchanger.use_part_name":"false",//把零件名称设置到Body上 "cadexchanger.write_ref_plane_as_hidden":"true",//隐藏参考平面 "cadexchanger.write_hybrid_bodies":"false",//保存混合Body "cadexchanger.write_release":"14",//输出版本14 15 16 17 18 19 "cadexchanger.multy_body":"true",//读取所有Body "cadexchanger.read_fdt":"0", //step read PMI //integer Drives Reading of FDT //(0=no 1=graphic only 2=graphic + semantic) "cadexchanger.write_fdt":"1", //step write PMI //integer Drives Writing of FDT //(0=no 1=semantic + graphic //2=semantic only 3=graphic only) "cadexchanger.write_fdt_polyline":"0", //step write PMI折线化 //integer Selects mode for graphic output //(0=default 1=minimal graphic //2=polyline 3=2D tesselation 4=3D tesselation) "cadexchanger.write_version":"0", //输出版本 //integer Writes Step Version //(0=AP214 or AP203E2 with FDT //1=AP203 2=AP214 3=AP203E2 4=AP242) "cadexchanger.write_itemname":"2", //Item名称 //integer Writes Names of Items (topological items) //[0] -> no (empty name) //[1] -> name from CAD if defined, else empty //[2] -> "n?iii" : ID from CAD "cadexchanger.write_property":"0", //step write 属性 //integer Writes Attributes and Properties //[0] -> no //[1] -> Product Data //[2] -> also general attributes(metadata) //except "File Property" //[3] -> all general attributes, also "File Property" "cadexchanger.rasterize_texts":"true",//文本折线化 "cadexchanger.write_prc":"true",//内嵌Prc "cadexchanger.geo_format":"0", //几何格式 //[0] -> Mesh (Default), //[1] -> BRep, [2] -> Mesh + BRep "cadexchanger.jt_pmi_as_semantic":"false",//PMI描述数据 "cadexchanger.write_xtbrep":"false",//输出精确数据 "cadexchanger.jtwrite_release":"80", //输出版本 //[80] -> version 8.0 (default), //[95] -> version 9.5 "cadexchanger.write_export_type":"0" //输出类型 //[0] -> Monolithic (default), //[1] -> Shattered, [2] -> PerPart 2.cadconverter配置参数 "cadconverter.boundaryline":"true",//边界线 "cadconverter.hiddenobject":"true",//隐藏对象 "cadconverter.spacespot":"true",//空间点 "cadconverter.spaceline":"true",//空间线 "cadconverter.customview":"true",//自定义视图 "cadconverter.model_property":"true",//模型属性 "cadconverter.cable":"true",//线缆 "cadconverter.cablesheath":"true",//线鞘 "cadconverter.layer":"true",//图层 "cadconverter.pmi":"true",// PMI "cadconverter.forcetess":"true",//使用SView的分元 "cadconverter.preview":"true",//缩略图 "cadconverter.only_current":"true",//只转换当前 "cadconverter.line_tolerance":"5",//折线公差 "cadconverter.angle_tolerance":"25",//角度公差 "cadconverter.outputmode":"0",//输出方式0、单一文件1、分散文件 "cadconverter.compress":"0",//压缩模式0、不压缩1、快速压缩2、高质量压缩 "cadconverter.mesh_merge":"0",//Mesh合并0、不合并1、合并 "cadconverter.snapshot":"true",//输出快照文件 "cadconverter.log":"0",//输出日志0、不输出1、普通用户2、高级用户3、开发人员 "cadconverter.debuginfo":"true",//输出PMI调试信息(开发人员使用) "cadconverter.model_compare":"true",//模型比较(适合Pro/E二次开发使用) 3.rvmconverter配置参数 "rvmconverter.lineartolerance":"5",//折线公差 "rvmconverter.angulartolerance":"25",//角度公差
返回值(JSON):
成功:
{ "return":"0", "configid": "bc07fd22-e4d3-4555-8c35-b75c36e391a2" }失败:
{ "return":"1",//1、3002、3003、2 "msg":"参数不得为空!" }
备注
无
保存用户默认配置
接口链接
mroot/convert/config/saveDefault
接口版本
7.1
说明
保存用户默认配置
参数:(POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
input | 是 | String | 输入类型(例:UG NX 3D) |
output | 是 | String | 输出类型(例:SVL2.0) |
转换配置相关参数:
1.cadexchanger配置参数 "cadexchanger.filaire":"true",//边界线 "cadexchanger.visibility":"false",//零件 "cadexchanger.asm_visibility":"false",//装配 "cadexchanger.fdt_visibility":"false",//PMI "cadexchanger.model_display":"false",//自定义视图 "cadexchanger.meta_parameters":"true",//模型属性 "cadexchanger.use_tessel":"false",//优先使用模型中轻量化数据 "cadexchanger.fdt":"true",//PMI "cadexchanger.par_solide":"false",//每个Body输出一个文件 "cadexchanger.per_catalog":"false",//每个Catalog输出一个文件 "cadexchanger.write_log_file":"true",//日志 "cadexchanger.linear_tol":"0.1",//折线公差 "cadexchanger.angular_tol":"10",//角度公差 "cadexchanger.body_to_nurbs":"false",//将所有的几何转换成Nurbs "cadexchanger.keep_assembly":"true",//保留装配信息 "cadexchanger.merge_bodies":"false",//合并Body "cadexchanger.name_as_406":"false",//将实体名称设置为406 "cadexchanger.write_body_attributes":"true",//填充Body属性 "cadexchanger.use_part_name":"false",//把零件名称设置到Body上 "cadexchanger.write_ref_plane_as_hidden":"true",//隐藏参考平面 "cadexchanger.write_hybrid_bodies":"false",//保存混合Body "cadexchanger.write_release":"14",//输出版本14 15 16 17 18 19 "cadexchanger.multy_body":"true",//读取所有Body "cadexchanger.read_fdt":"0", //step read PMI //integer Drives Reading of FDT //(0=no 1=graphic only 2=graphic + semantic) "cadexchanger.write_fdt":"1", //step write PMI //integer Drives Writing of FDT //(0=no 1=semantic + graphic //2=semantic only 3=graphic only) "cadexchanger.write_fdt_polyline":"0", //step write PMI折线化 //integer Selects mode for graphic output //(0=default 1=minimal graphic //2=polyline 3=2D tesselation 4=3D tesselation) "cadexchanger.write_version":"0", //输出版本 //integer Writes Step Version //(0=AP214 or AP203E2 with FDT //1=AP203 2=AP214 3=AP203E2 4=AP242) "cadexchanger.write_itemname":"2", //Item名称 //integer Writes Names of Items (topological items) //[0] -> no (empty name) //[1] -> name from CAD if defined, else empty //[2] -> "n?iii" : ID from CAD "cadexchanger.write_property":"0", //step write 属性 //integer Writes Attributes and Properties //[0] -> no //[1] -> Product Data //[2] -> also general attributes(metadata) //except "File Property" //[3] -> all general attributes, also "File Property" "cadexchanger.rasterize_texts":"true",//文本折线化 "cadexchanger.write_prc":"true",//内嵌Prc "cadexchanger.geo_format":"0", //几何格式 //[0] -> Mesh (Default), //[1] -> BRep, [2] -> Mesh + BRep "cadexchanger.jt_pmi_as_semantic":"false",//PMI描述数据 "cadexchanger.write_xtbrep":"false",//输出精确数据 "cadexchanger.jtwrite_release":"80", //输出版本 //[80] -> version 8.0 (default), //[95] -> version 9.5 "cadexchanger.write_export_type":"0" //输出类型 //[0] -> Monolithic (default), //[1] -> Shattered, [2] -> PerPart 2.cadconverter配置参数 "cadconverter.boundaryline":"true",//边界线 "cadconverter.hiddenobject":"true",//隐藏对象 "cadconverter.spacespot":"true",//空间点 "cadconverter.spaceline":"true",//空间线 "cadconverter.customview":"true",//自定义视图 "cadconverter.model_property":"true",//模型属性 "cadconverter.cable":"true",//线缆 "cadconverter.cablesheath":"true",//线鞘 "cadconverter.layer":"true",//图层 "cadconverter.pmi":"true",// PMI "cadconverter.forcetess":"true",//使用SView的分元 "cadconverter.preview":"true",//缩略图 "cadconverter.only_current":"true",//只转换当前 "cadconverter.line_tolerance":"5",//折线公差 "cadconverter.angle_tolerance":"25",//角度公差 "cadconverter.outputmode":"0",//输出方式0、单一文件1、分散文件 "cadconverter.compress":"0",//压缩模式0、不压缩1、快速压缩2、高质量压缩 "cadconverter.mesh_merge":"0",//Mesh合并0、不合并1、合并 "cadconverter.snapshot":"true",//输出快照文件 "cadconverter.log":"0",//输出日志0、不输出1、普通用户2、高级用户3、开发人员 "cadconverter.debuginfo":"true",//输出PMI调试信息(开发人员使用) "cadconverter.model_compare":"true",//模型比较(适合Pro/E二次开发使用) 3.rvmconverter配置参数 "rvmconverter.lineartolerance":"5",//折线公差 "rvmconverter.angulartolerance":"25",//角度公差
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",//1、3002、3003、1002 "msg":"参数不得为空!" }
备注
无
添加到转换
接口链接
mroot/convert/add
接口版本
7.1
说明
将云盘里的文件添加到转换列表,同时创建转换任务
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
userfileid | 是 | String | 需要转换的用户文件id |
configid | 否 | String | 配置id,为空时用默认配置 |
output | 否 | String | 输出类型,为空时取默认值(例:SVL2.0) |
返回值(JSON):
成功:
{ "return":"0", "taskid":"8d2c7c6c-e7aa-49ba-ce609dd7888b",//新建的任务时返回 "userfileid":"d9f28797-daa53-4a79465741bc"//转换引用时返回 }失败:
{ "return":"1",//1、3002、3003、3、8005、8003、8004、4003 "msg":"参数不得为空!" }
备注
无
获取转换任务列表
接口链接
mroot/convert/list
接口版本
7.1
说明
获取转换中、等待中、停止和失败的任务
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
begindate | 否 | String | 根据任务的创建时间进行检索,分别表示任务创建时间的开始跟结束时间 |
enddate | 否 | String |
返回值(JSON):
成功:
{ "return":"0", "list": [ { "begintime": "2019-07-26 15:04:30",//开始转换时间 "configid": "f6d6c604-5941-4f7f-8276-a8094546098d",//配置id "createtime": "2019-07-26 15:04:29",//创建时间 "filename": "demo.prt",//原文件名 "filesize": 368640,//原文件大小 "finishtime": "2019-07-26 15:04:30",//转换结束时间 "id": "a9d8f4bb-d20e-432c-9c85-5c77eca99b2f",//任务id "fileid": "cac6c1be-126a-41ff-87cc-301b3090e64c", "input": "UG NX 3D",//输入类型 "inputformat": "prt",//输入的文件格式 "logname": "demo.prt.log",//转换日志名 "outfilename": "demo.prt.svlx",//转换出的文件名 "outfilesize": 14255,//转换出的文件大小 "output": "SVL2.0",//转换输出类型 "outputformat": "svlx",//转换输出格式 "outuserfileid": "e36654fb-3399-4-bc24965deb",//转换出的文件在云盘中的id "pfolderid": "6f12180c-ae8c-9b-f7c247c0995d",//云盘中所处的父文件夹id "result": "8002",//错误吗参考return返回值 "state": 4,//转换状态值,具体参考本文档return返回值 "userfileid": "bc92668b-8bc4-45ebe-09de449243e8",//需要转换的用户文件id "userid": "bc07fd22-e4d3-4555-8c35-b75c36e391a2", "version": "2.0"//转换版本 }, { ... } ] }失败:
{ "return":"1",//1、3002、3003 "msg":"参数不得为空!" }
备注
无
获取转换完成的任务列表
接口链接
mroot/convert/converted
接口版本
7.1
说明
获取转换成功的任务
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
begindate | 否 | String | 根据任务的结束时间进行检索,分别表示任务结束时间的开始跟结束时间 |
enddate | 否 | String |
返回值(JSON):
成功:
{ "return":"0", "list": [ { "begintime": "2019-07-26 15:04:30",//开始转换时间 "configid": "f6d6c604-5941-4f7f-8276-a8094546098d",//配置id "createtime": "2019-07-26 15:04:29",//创建时间 "filename": "demo.prt",//原文件名 "filesize": 368640,//原文件大小 "finishtime": "2019-07-26 15:04:30",//转换结束时间 "id": "a9d8f4bb-d20e-432c-9c85-5c77eca99b2f",//任务id "fileid": "cac6c1be-126a-41ff-87cc-301b3090e64c", "input": "UG NX 3D",//输入类型 "inputformat": "prt",//输入的文件格式 "logname": "demo.prt.log",//转换日志名 "outfilename": "demo.prt.svlx",//转换出的文件名 "outfilesize": 14255,//转换出的文件大小 "output": "SVL2.0",//转换输出类型 "outputformat": "svlx",//转换输出格式 "outuserfileid": "e36654fb-3399-4-bc24965deb",//转换出的文件在云盘中的id "pfolderid": "6f12180c-ae8c-9b-f7c247c0995d",//云盘中所处的父文件夹id "result": "8002",//错误吗参考return返回值 "state": 5,//转换状态值,具体参考本文档return返回值 "userfileid": "bc92668b-8bc4-45ebe-09de449243e8",//需要转换的用户文件id "userid": "bc07fd22-e4d3-4555-8c35-b75c36e391a2" }, { ... } ] }失败:
{ "return":"1",//1、3002、3003 "msg":"参数不得为空!" }
备注
无
移动端获取任务列表
接口链接
mroot/convert/mobileList
接口版本
7.1
说明
移动端获取任务列表,包含所有状态的任务
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
searchtext | 否 | String | 搜索内容:根据文件名搜索 |
返回值(JSON):
成功:
{ "return":"0", "list": [ { "begintime": "2019-07-26 15:04:30",//开始转换时间 "configid": "f6d6c604-5941-4f7f-8276-a8094546098d",//配置id "createtime": "2019-07-26 15:04:29",//创建时间 "filename": "demo.prt",//原文件名 "filesize": 368640,//原文件大小 "finishtime": "2019-07-26 15:04:30",//转换结束时间 "id": "a9d8f4bb-d20e-432c-9c85-5c77eca99b2f",//任务id "input": "UG NX 3D",//输入类型 "inputformat": "prt",//输入的文件格式 "logname": "demo.prt.log",//转换日志名 "outfilename": "demo.prt.svlx",//转换出的文件名 "outfilesize": 14255,//转换出的文件大小 "output": "SVL2.0",//转换输出类型 "outputformat": "svlx",//转换输出格式 "outuserfileid": "e36654fb-3399-4-bc24965deb",//转换出的文件在云盘中的id "pfolderid": "6f12180c-ae8c-9b-f7c247c0995d",//云盘中所处的父文件夹id "result": "8002",//错误吗参考return返回值 "state": 5,//转换状态值,具体参考本文档return返回值 "userfileid": "bc92668b-8bc4-45ebe-09de449243e8",//需要转换的用户文件id "userid": "bc07fd22-e4d3-4555-8c35-b75c36e391a2" }, { ... } ] }失败:
{ "return":"1",//1、3002、3003 "msg":"参数不得为空!" }
备注
无
获取转换状态
接口链接
mroot/convert/status
接口版本
7.1
说明
批量获取转换状态
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
taskids | 是 | String | 任务id字符串,多个任务中间用逗号隔开 |
返回值(JSON):
成功:
{ "return":"0", "list": [ { "state": 5,//转换状态值,具体参考本文档return返回值 "taskid": "1193bd23-fcf7-4f07-bd8d-041eca74a086", "order": "5",//队列中的位置 "process": "100",//转换进度 "result":"4003" }, { "state": 5, "taskid": "a9d8f4bb-d20e-432c-9c85-5c77eca99b2f", "order": ">20",//队列中的位置 "process": "100",//转换进度 "result":"4003" } ] }失败:
{ "return":"1",//1、3002、3003 "msg":"参数不得为空!" }
备注
无
重新转换
接口链接
mroot/convert/reconvert
接口版本
7.1
说明
重新转换
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
taskid | 是 | String | 需要重新转换的任务id |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",//1、3002、3003、3、8006、8007 "msg":"参数不得为空!" }
备注
无
删除任务
接口链接
mroot/convert/delete
接口版本
7.1
说明
删除任务
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
taskids | 是 | String | 任务id字符串,多个用逗号隔开 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",//1、3002、3003 "msg":"参数不得为空!" }
备注
无
停止当前转换
接口链接
mroot/convert/stop
接口版本
7.1
说明
停止当前转换
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
taskids | 是 | String | 任务id字符串,多个用逗号隔开 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",// 1、3002、3003 "msg":"参数不得为空!" }
备注
无
获取任务信息
接口链接
mroot/convert/info
接口版本
7.1
说明
获取任务信息
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
taskid | 是 | String | 任务id |
返回值(JSON):
成功:
{ "return":"0", "task": { "begintime": "2019-07-26 15:03:48", "configid": "5f78e28a-8670-4211-b3f1-8abf965e6435", "createtime": "2019-07-26 15:03:48", "filename": "CL367.prt", "filesize": 7193047, "finishtime": "2019-07-26 15:03:52", "id": "1193bd23-fcf7-4f07-bd8d-041eca74a086", "input": "UG NX 3D", "inputformat": "prt", "logname": "CL367.prt.log", "outfilename": "CL367.prt.svlx", "outfilesize": 80698, "output": "SVL2.0", "outputformat": "svlx", "outuserfileid": "3cfb0f90-76d4-4165-a92a-4bd751344c6f", "pfolderid": "6f12180c-ae8c-4bab-819b-f7c247c0995d", "result": "8002",//错误码参考return返回值 "state": 5, "userfileid": "dba570af-efcc-4430-a87b-1e4a9c601704", "userid": "bc07fd22-e4d3-4555-8c35-b75c36e391a2" } }失败:
{ "return":"1",// 1、3002、3003、3、8006 "msg":"参数不得为空!" }
备注
无
任务置顶转换
接口链接
mroot/convert/top
接口版本
7.1
说明
任务置顶转换,针对的是等待中的任务
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
taskid | 是 | String | 任务id |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",// 1、3002、3003、3、8006、8008 "msg":"参数不得为空!" }
备注
无
获取转换日志内容
接口链接
mroot/convert/logInfo
接口版本
7.1
说明
获取转换日志内容
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
taskid | 是 | String | 任务id |
返回值(JSON):
成功:
{ "return":"0", "log": [ "<DtkApiVersion>174<\DtkApiVersion>",//日志第一行内容 "Start API : 16:21:13 ", //日志第二行内容 "End API : 16:21:13 ", //日志第三行内容 "API started during : 0sec "//.... ] }失败:
{ "return":"1",// 1、3002、3003、3、8006、8009 "msg":"参数不得为空!" }
备注
无
添加到后台转换
接口链接
mroot/convert/backstage
接口版本
7.1
说明
添加到后台转换,转换成功后会推送给客户端消息,安卓端推送需要集成个推api
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
onlineid | 是 | String | 访问凭证 |
taskid | 是 | String | 任务id |
返回值(JSON):
成功:
{ "return":"0"//待转换完成后会给客户端发送推送消息 }失败:
{ "return":"1",// 1、3002、3003、3、8006、8011 "msg":"参数不得为空!" }消息体格式:
苹果设备收到的消息格式: { "aps":{ "alert" :{ "body":"fafdafs", //消息内容 "title":"dfada"//消息标题 } "badge": 1,//小红圈的数值 "sound" : "default"//铃声 }, "parameters":"{ "outuserfileid":"8792148c-6100-421f-8636-ddbee04bc894", "filename":"abc.prt", "version":"7.1" }", "type":3//消息类型,3转换消息 } 安卓设备收到的消息: { "parameters":{ "type":3 "outuserfileid":"8792148c-6100-421f-8636-ddbee04bc894", "filename":"abc.prt", "version":"7.1" } }
备注
无
授权服务
获取访问令牌
接口链接
mroot/licence/access
接口版本
7.1
说明
获取访问令牌,验证许可首先需要调此接口获取令牌
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
id | 是 | String | 许可唯一id,从许可文件中获取 |
name | 是 | String | 产品名 SView for H5 SView for Android SView for iOS SView for Windows SView Designer SView Convertor |
version | 是 | String | 产品版本号 |
devices | 是 | String | 客户设备唯一号 |
state | 是 | String | 客户端生成的随机状态数 |
返回值(JSON):
成功:
{ "return":"0", "token":"649bcd20-a635-488a-8fd7-55647a8a6c6c", "expires":"3600"//有效时间/秒 }失败:
{ "return":"1",// 1、2006、2007、2008 "msg":"参数错误!" }
备注
无
验证许可
接口链接
mroot/licence/check
接口版本
7.1
说明
验证许可
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
token | 是 | String | 访问令牌,由上一个接口获得 |
devices | 是 | String | 客户设备唯一号 |
users | 否 | String | 用户账号 |
modules | 否 | String | 功能模块,["openFile","explosive","animation","measure"] |
state | 是 | String | 客户端生成的随机状态数 |
返回值(JSON):
成功:
{ "return":"0", "context": "dfdfdsfdsf"//使用state加密的许可信息,内容为[app:1];0=认证失败,1=认证成功。 }失败:
{ "return":"1",//1、2009、2022、2023、2018、2010、2011、2012、2019、2004 "msg":"参数错误!" }
备注
无
释放许可
接口链接
mroot/licence/release
接口版本
7.1
说明
释放许可,仅网络版并发许可类型使用
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
token | 是 | String | 访问令牌,由上一个接口获得 |
devices | 是 | String | 客户设备唯一号 |
users | 否 | String | 用户账号 |
modules | 否 | String | 功能模块,["openFile","explosive","animation","measure"] |
type | 是 | String | 认证模式,0=设备ID/Mac地址认证(Devices),1=账户认证 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",// 1、2009、2022、2023、2013、2012 "msg":"参数错误!" }
备注
无
获取许可信息
接口链接
mroot/licence/info
接口版本
7.1
说明
获取许可信息
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
token | 是 | String | 访问令牌,由上一个接口获得 |
names | 是 | String | 授权信息名,即lic文件中的等号“=”左侧的信息名。如果要获取所有,则使用“all”。如果要获取部分,使用半角逗号来间隔,如“Customer, CustomerEmail” |
devices | 是 | String | 客户设备唯一号 |
state | 是 | String | 客户端生成的随机状态数 |
返回值(JSON):
成功:
{ "return":"0", "context": "{ "CopyRight":"Shandong Hoteam Software Co.,Ltd", "CreateDate":"2019-07-23", "Creator":"SView License Tools v1.0", "Customer":"测试", "CustomerEmail":"xxxxxxxxxx@qq.com", "EndDate":"2019-07-28", "ID":"20190************25697", "LicenseType":"2110", "ProductName":"SView for HTML5", "ProductVersion":"6.1", "SView License":"v1.0", "Seat":"10", "ServerMAC":"xx-xx-xx-xx-xx-xx", "SignCode":"6a2845654ae7f117d697471c9e5ef352", "Term":"5" }" }失败:
{ "return":"1",// 1、2009、2022、2023 "msg":"参数错误!" }
备注
无
会议服务
创建会议
接口链接
mroot/meeting/create
接口版本
7.1
说明
创建会议
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
meetingid | 是 | String | 会议id |
title | 是 | String | 会议标题 |
presenter | 是 | String | 会议主持人 |
password | 否 | String | 会议密码 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",// 1、6001 "msg":"参数错误!" }
备注
无
参会者参会
接口链接
mroot/meeting/enter
接口版本
7.1
说明
参会者参会
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
meetingid | 是 | String | 会议id |
name | 是 | String | 参会者名字 |
deviceid | 是 | String | 参会者唯一标识 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",// 1、6002、6003 "msg":"参数错误!" }
备注
无
参会者退会
接口链接
mroot/meeting/out
接口版本
7.1
说明
参会者退会
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
meetingid | 是 | String | 会议id |
deviceid | 是 | String | 参会者唯一标识 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",// 1 "msg":"参数错误!" }
备注
无
引用
接口链接
mroot/meeting/reference
接口版本
7.1
说明
客户端提交文件时,首先发送此请求,如果服务器返回文件不存在,再发送真实上传模型的请求。
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
meetingid | 是 | String | 会议id |
filename | 是 | String | 文件的原文件名 |
deviceid | 是 | String | 用户唯一标识 |
md5 | 是 | String | 文件MD5 |
name | 否 | String | 模型中文名 |
type | 是 | String | 文件类型 0模型 1附件 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",// 1、6002、6003、6004 "msg":"参数错误!" }
备注
无
上传
接口链接
mroot/meeting/upload
接口版本
7.1
说明
上传
参数:(GET、POST)
multipart/form-data
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
modelfile | 是 | 文件流 | 上传的文件 |
meetingid | 是 | String | 会议id |
deviceid | 是 | String | 用户唯一标识 |
name | 否 | String | 模型中文名 |
type | 是 | String | 文件类型 0模型 1附件 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",// 1、6005、6002、6003 "msg":"参数错误!" }
备注
无
获取会议当前信息
接口链接
mroot/meeting/info
接口版本
7.1
说明
获取会议当前信息
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
meetingid | 是 | String | 会议id |
返回值(JSON):
成功:
{ "return":"0", "meeting":{ "modelid":"5f78e28a-8670-42",//会议模型id "modelname":"prt.svl", "fileid":"5f78e28a-8670-42",//会议模型所引用的源模型id "modelmd5":"dfsfdfsd", "meetingstate":"0"//会议状态 0:进行中 1:已结束 } }失败:
{ "return":"1",// 1、6002、6003、6006 "msg":"参数错误!" }
备注
无
关闭会议
接口链接
mroot/meeting/close
接口版本
7.1
说明
关闭会议
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
meetingid | 是 | String | 会议id |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",// 1 "msg":"参数错误!" }
备注
无
会议模型下载
接口链接
mroot/meeting/download
接口版本
7.1
说明
会议模型下载
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
modelid | 是 | String | 会议模型id |
type | 是 | String | 文件类型 0模型 1附件 |
返回值(JSON):
成功:
{ 输出文件流 }失败:
{ "return":"1",// 1或3 "msg":"参数错误!" }
备注
无
会议邀请
接口链接
mroot/meeting/invite
接口版本
7.1
说明
会议邀请
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
title | 是 | String | 会议标题 |
meetingid | 是 | String | 会议号 |
presenter | 是 | String | 主持人 |
password | 是 | String | 密码 |
count | 是 | String | 会议人数 |
返回值(页面):
成功:
{ 返回会议邀请jsp页面 }
腾讯会议服务
获取UserSig
接口链接
mroot/tim/login/usersig
接口版本
8.0
说明
获取usersig
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
userid | 否 | String | 用户需要加密的id,为空时服务器自动生成并返回 |
返回值:
成功:
{ "return": "0", "userid": "10000", "usersig": "gfsgfdsgdfgsdf" }失败:
{ "return":"1",// 1 "msg":"参数错误!" }
备注
无
创建会议
接口链接
mroot/tim/group/create
接口版本
8.0
说明
创建即时通讯会议
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
name | 是 | String | 会议名称 |
userid | 是 | String | 会议创建者id |
host | 是 | String | 会议主持人名称 |
返回值:
成功:
{ "return": "0", "groupid": "12345678" //会议id }失败:
{ "return":"1",// 1 "msg":"参数错误!" }
备注
无
获取会议列表
接口链接
mroot/tim/group/list
接口版本
8.0
说明
获取即时通讯会议列表
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
offset | 否 | String | 偏移量,默认0 |
pagesize | 否 | String | 每页条数,默认20 |
searchcontent | 否 | String | 按会议名称模糊查询 |
返回值:
成功:
{ "return": "0", "groups": [ { "createtime": "2020-10-01 15:37:03", "id":"45854827",//会议id,使用此id与即时通讯sdk进行交互 "isdelete": "0", "name": "group",//会议名称 "state": "0",//会议状态 "0" 进行中,"1" 已结束 "userid": "zhangsan", //会议创建者id "host":"主持人名称" }, {...} ] }失败:
{ "return":"1",// 1 "msg":"参数错误!" }
备注
无
引用
接口链接
mroot/tim/group/reference
接口版本
8.0
说明
客户端提交文件时,首先发送此请求,如果服务器返回文件不存在(retrun="6004"),再发送真实上传模型的请求。
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
meetingid | 是 | String | 会议id |
filename | 是 | String | 文件的原文件名 |
md5 | 是 | String | 文件MD5 |
返回值:
成功:
{ "return": "0", "fileid":"dfdfsdf"//源文件id }失败:
{ "return":"1",// 1 "msg":"参数错误!" }
备注
无
上传
接口链接
mroot/tim/group/upload
接口版本
8.0
说明
上传
参数:(GET、POST)
multipart/form-data
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
modelfile | 是 | 文件流 | 上传的文件 |
meetingid | 是 | String | 会议id |
返回值(JSON):
成功:
{ "return":"0", "fileid":"dfdfsdf"//源文件id }失败:
{ "return":"1",// 1、6005、6002、6003 "msg":"参数错误!" }
备注
无
性能改进
获取SVLX的子文件
接口链接
mroot/svlx/nodes
接口版本
7.1
说明
根据文件扩展名获取SVLX的子文件,当传入相对路径时,先根据相对路径定位到指定目录,然后再获取文件
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
id | 是 | String | SVLX源文件id |
content | 是 | String | 获取的内容,多个中间用英文逗号隔开 获取所有:all 获取子文件: fileinfo,Info,bom,lod, animation,pmi,mesh,model,view,lod, annotation,measure,attribute,geo 获取相对路径下的文件:传需要获取的文件名,中间用英文逗号隔开 |
compress | 否 | String | 是否压缩 0不压缩,1压缩,默认压缩 |
relativepath | 否 | String | 相对路径 |
返回值:
成功:
{ 输出文件流 }失败:
{ "return":"1",// 1、3、1001、 1004 "msg":"参数错误!" }
备注
无
获取mesh数据
接口链接
mroot/svlx/mesh
接口版本
7.1
说明
根据模型ID跟lod级别,请求mesh数据
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
id | 是 | String | SVLX源文件id |
models | 是 | String | 模型id跟lod级别,格式如下: "modelid":lodlevel","modelid":lodlevel",… |
返回值:
成功:
{ 输出文件流 }失败:
{ "return":"1",// 1、2、3、1006 "msg":"参数错误!" }
备注
无
获取内容列表
接口链接
mroot/svlx/nodelist
接口版本
7.1
说明
根据type类型,获取对应文件的内容列表,例如type值为view时,则获取视图列表。(返回列表基本内容)
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
id | 是 | String | SVLX源文件id |
type | 是 | String | 内容类型: view:视图列表 、 自定义视图列表 annotation:批注列表 |
range | 否 | String | 0 :内部的 1:外部的 2:全部的 默认0,当获取视图列表的时候此参数为必填 |
modelid | 否 | String | 文件内部模型ID 当获取视图时需要传递 |
uniqueid | 否 | String | 客户端唯一标识 当range来源为从外部读取时,此参数代表是获取哪个客户端的创建的视图 |
返回值:
成功:
批注列表返回格式:
{ "return":"0", "list":[ { "createid": "110886",//批注id "type": "0"//批注类型 }, { "createid": "110985", "type": "2" }, { ... } ] }
视图列表返回格式:
{ "return": "0", "innerlist": [ //文件内部视图列表 { "id": "1002", //文件内部视图id "name": "DefaultView"//文件内部视图名称 }, { "id": "1002", "name": "DefaultView" }, {...} ], "outerlist": [ //自定义视图返回格式 { "id": "8db6a21a-f2f6-4f88-94a3-ea6505238039",//数据库中视图id "fileid":"4eae500d-ab42-432d-8b2f-57f52dc3e97b",//源文件id "modelid": "1014",//文件内部的模型id,由创建视图时传到服务器 "name": "自定义视图1", "image1": "data/upload/modelfile/xx/xx/..._1.png",//视图缩略图大图 "image2": "data/upload/modelfile/xx/xx/..._2.png",//视图缩略图小图 "creatorid": "123123123",//视图创建者id "creator": "张三",//视图创建者名称 "createtime":"2019-11-25 19:39:53", "modelviewid":"45df56dad",//本地视图id,用来跟本地已有视图做比较 }, {....} ] }失败:
{ "return":"1",// 1、2、3、1006 "msg":"参数错误!" }
备注
无
获取元素内容
接口链接
mroot/svlx/element
接口版本
7.1
说明
根据type类型及相关id,获取对应文件的单个元素详细内容
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
id | 是 | String | SVLX源文件id |
type | 是 | String | 内容类型: view、视图内容 viewcontent、视图关联内容 annotation、批注内容 measure、测量 attribute、自定义属性 model、模型属性 instance、实例属性 geo、几何属性 |
typeids | 是 | String | 根据type类型,传递不同类型的id: 用英文逗号隔开,当type为视图关联内容时,参数值为数据库的视图id |
geoid | 否 | String | 几何要素id: type为几何属性时需要此参数 |
range | 否 | String | 0 :内部的 1:外部的 默认0,当获取视图内容与视图关联内容的时候此参数为必填,获取视图关联内容时此参数值传“1” |
返回值:
成功:
视图内容:
{ "innerviews": [ //key为视图id,value为对应视图的json串(格式与视图文件中一致) { "1014": { ... } }, { "1016": { .... } } ], "outerviews": [ { "id": "8db6a21a-f2f6-4f88-94a3-ea6505238039",//数据库中视图id "content": "........",//视图的具体json数据 }, { ...... } ], "return": "0" }
视图关联内容:
{ 返回数据流 }
批注内容:
{ "annotations": [ //key为批注id,value为对应批注的json串(格式与批注文件中一致) { "1014": { ... } }, { "1016": { .... } } ], "return": "0" }
测量内容:
{ "measures": [ { "1014": { ... } }, { "1016": { .... } } ], "return": "0" }
自定义属性:
{ "attributes": [ { "1014": { ... } }, { "1016": { .... } } ], "return": "0" }
模型属性:
{ "models": [ { "1014": { "id": 1014, "name": "feijiyinqing" } }, { "1016": { "id": 1016, "name": "ASM0001_" } } ], "return": "0" }
实例属性:
{ "instances": [ { "1013": { "id": 1013, "name": "feijiyinqing" } }, { "1015": { "id": 1015, "name": "ASM0001_" } } ], "return": "0" }
几何属性:
{ "content": { "axisDirection": "0.00000000 0.00000000 1.00000000", "axisOrigin": "0.00000000 0.00000000 -1.25000000", "radius": "1.50000000", "type": "4" }, "return": "0" }失败:
{ "return":"1",// 1、2、3、1006 "msg":"参数错误!" }
备注
无
保存自定义视图
接口链接
mroot/svlx/save
接口版本
7.1
说明
保存用户的自定义视图、关联内容
参数:(GET、POST)
multipart/form-data
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
id | 是 | String | 保存视图时:代表SVLX文件id 保存视图内容时:代表视图id id需要用get方式传 |
content | 是 | String | 自定义视图的json格式字符串 |
contentfile | 是 | 文件流 | 视图关联内容的文件 |
image1 | 是 | 文件流 | 视图截图,大尺寸截图 |
image2 | 是 | 文件流 | 视图截图,小尺寸截图 |
uniqueid | 否 | String | 客户端唯一标识,保存视图时需要传递此参数 |
creator | 否 | String | 创建者名称 |
name | 是 | String | 视图名称 |
modelid | 是 | String | 模型文件中的模型id,用来标记给哪个模型添加的视图 |
返回值(JSON):
成功:
{ "return":"0", "id":"fdadfdfsds"//创建的视图id }失败:
{ "return":"1",// 1、1009 "msg":"参数错误!" }
备注
无
删除自定义视图
接口链接
mroot/svlx/delete
接口版本
7.1
说明
删除用户自定义视图不是自己的视图禁止删除
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
viewid | 是 | String | 需要删除的viewid(数据库中的id) |
uniqueid | 是 | String | 视图所属作者的ID |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",// 1、2、1007 "msg":"参数错误!" }
备注
无
编辑自定义视图
接口链接
mroot/svlx/edit
接口版本
7.1
说明
编辑用户自定义视图不是自己的视图禁止编辑
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
viewid | 是 | String | 需要删除的viewid(数据库中的id) |
uniqueid | 是 | String | 视图所属作者的ID |
name | 是 | String | 新视图名 |
返回值(JSON):
成功:
{ "return":"0" }失败:
{ "return":"1",// 1、2、1008 "msg":"参数错误!" }
备注
无
场景信息
保存配置
接口链接
mroot/set/create
接口版本
7.2
说明
创建配置信息,存在时执行修改,不存在时执行保存
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
uniqueid | 是 | String | 唯一号(可传用户id) |
modelid | 否 | String | 模型id(文档配置时必传) |
content | 是 | String | 配置内容json串 |
type | 是 | String | 配置类型:1:系统配置 2:文档配置 |
返回值:
成功:
{ "return":"0" }失败:
{ "return":"1", "msg":"参数错误!" }
备注
无
获取配置
接口链接
mroot/set/get
接口版本
7.2
说明
获取配置信息
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
uniqueid | 是 | String | 唯一号(可传用户id) |
modelid | 否 | String | 模型id(文档配置时必传) |
type | 是 | String | 配置类型:1:系统配置 2:文档配置 |
返回值:
成功:
{ "return":"0", "content":"...."//配置信息json串 }失败:
{ "return":"1", "msg":"参数错误!" }
备注
无
分散文件
加载分散文件
接口链接
mroot/svlx/distribute/load
接口版本
7.2
说明
根据不同类型,获取合并或压缩后的分散文件用于显示
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
userfileid | 是 | String | 用户文件id |
filenames | 否 | String | 需要查找的文件名,type为1时必传 |
type | 是 | String | 分散文件合并类型: 1:通过指定文件名查询,返回指定文件压缩包 2:打包,返回svlx,子文件压缩到文件里"items"文件夹下 3:合并,返回单一svlx |
返回值:
成功:
{ 返回文件流 }失败:
{ "return":"1",1、2、3、1001、1006 "msg":"参数错误!" }
备注
无
查找文件
接口链接
mroot/svlx/distribute/find
接口版本
7.2
说明
根据文件名查找用户空间当前目录下的子文件
参数:(GET、POST)
变量名 | 必填 | 类型 | 描述 |
---|---|---|---|
userfileid | 是 | String | 用户文件id |
filename | 是 | String | 需要查找的文件名 |
返回值:
成功:
{ "return": "0", "ufid":"....",//用户文件id "fileid":"....",//对应的源文件id }失败:
{ "return":"1",1、4001 "msg":"参数错误!" }
备注
无